package com.bsfcs.rag.service;

import com.bsfcs.rag.entity.ChatParam;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;

@Service
public class ChatService {

    private final DocumentIngestionService vectorStore;



    public ChatService(DocumentIngestionService vectorStore ) {
        this.vectorStore = vectorStore;

    }

    public Flux<String> chat(ChatParam chatParam) {
        return vectorStore.similaritySearch(chatParam);
    }


}